const { 
  getServiceProductList, 
  getServiceProductDetail
 } = require('../dao/productDao');

const express = require('express');

const router = express.Router();

router.get('/GetServiceProductList', (req, res) => {
  const data = getServiceProductList();
  res.json(data);
});

router.get('/GetServiceProductDetail?:ProductGuid', (req, res) => {
  const productGuid = req.query['ProductGuid'] || '这是一个默认的值，因为你在参数中没有传递Guid';
  const data = getServiceProductDetail(productGuid);
  res.json(data);
});


module.exports = router;